import 'package:app/config/config.dart';
import 'package:app/model/user_vo.dart';
import 'package:flutter/material.dart';

/// 用户共享对象
class UserModel with ChangeNotifier {
  UserVo get user => GlobalConfig.profile;
  set user(UserVo userVo) {
    GlobalConfig.profile = userVo;
    notifyListeners();
  }
}

/// 主题共享对象
class ThemeModel with ChangeNotifier {
  String _theme = GlobalConfig.theme;
  String get theme => _theme;
  set theme(String theme) {
    _theme = theme;
    notifyListeners();
  }
}
